package com.demo.mqtt.common.fromResource.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;

/**
 * <p>
 *
 * </p>
 *
 * @author gobigg
 * @since 2020-07-21
 */
@Data
@Builder
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor //全参构造函数
@NoArgsConstructor  //无参构造函数
public class SysRole implements GrantedAuthority {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String name;

    @TableField(value = "role")
    private String authority;

    private Boolean isAdmin;

    private Boolean isInward;

    private Long tenantId;
}
